<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport"
    content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
  <meta http-equiv="pragma" content="no-cache">
  <meta http-equiv="cache-control" content="no-cache">
  <meta http-equiv="expires" content="0">
  <link rel="icon" href="<%= BASE_URL %>favicon.png">
  <title>iFlorens</title>

</head>

<body>
  <a-button onClick="dowm()">自爱爱上</a-button>
  <noscript>
    <strong>We're sorry but sone-vue-cli doesn't work properly without JavaScript enabled. Please enable it to
      continue.</strong>
  </noscript>
  <div id="app"></div>
</body>
<script src="https://cdn.jsdelivr.net/npm/jspdf/dist/jspdf.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/html2canvas@1.4.1/dist/html2canvas.min.js"></script>


<script>

  function dowm() {
    const pdf = new jspdf.jsPDF({ unit: 'pt', format: [595, 500] })
    // pdf.addFont('SourceHanSans-Normal.ttf', 'SourceHanSans-Normal', 'normal')
    // pdf.setFont('SourceHanSans-Normal')
    pdf.html(document.body, {
      callback: function (doc) {
        debugger
        doc.save(`${this.fileName}.pdf`)
      },
      x: 10,
      y: 20
    })
  }
</script>

</html>